
# fread_csv: 读取 csv 文件 ----

fread_csv <- function(file, row.names = FALSE){
  data <- data.table::fread(file, header=TRUE) %>% 
    as.data.frame() 
  
  if (row.names || colnames(data)[1]=='V1') {
    return(tibble::column_to_rownames(data, colnames(data)[1]))
  } else {
    return(data)
  }
}